/**
 *  File is synonomous to folder, the difference lies in file type, if its "folder"
 *  the file object is indeed a folder. also note that the file size might be same for all folders
 *  consider this before comparing files based on size
 *
 *  @param size          is the size of the file in bytes and is assumed to be unique across all the files.
 *   	If a super strange instance of two different files with same size happens to exist, its a bug for now.
 *		I might consider using the blob structure and capture the position of 100th,200th,300th ..
 *		so on to identify the file uniquely
 *  @param parentFolder  is the id of the parent folder
 *  @param type 		 is the file type with values MP3, WAV, FOLDER for now . #TODO Improve it for Enum
 *  @param url 			 is the url generated and updated here everytime the file is scanned
 *	@param mainTagId	 is the maintag associated to the file, all the important transactions like ratings,
 *							no of times played etc are associated to that tag. usually its generated using
 *							the name of the file. #TODO a better algorithem to generate it compare it with tags across
 */

function File(name, size, parentFolder, type, url, mainTagId) {
	this.name         = name;
	this.size         = size;
	this.parentFolder = parentFolder;
	this.type         = type;
	this.url          = url;
	this.mainTagId    = mainTagId || 0; //assign 0 if no maintagId is specified
}

function Tag(name) {
	this.name   = name;
	this.rating = 0;
	this.count  = 0;
}